package com.schedule.mapper;

import com.github.pagehelper.Page;
import com.schedule.daoVo.ScheduleVo;
import com.schedule.dto.SchedulePageDto;
import com.schedule.entity.Schedule;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ScheduleMapper {


/**
 * @param newSchedule
 * 插入新日志
 * **/
    void InsertSchedule(Schedule newSchedule);
/***
 * @param userId
 * 获取所有数据
 * */
    @Select("Select * from schedule WHERE user_id = #{userId}")
    List<ScheduleVo> selectByUserId(Long userId);
/***
 * @param ids
 * 批量删除数据
 * ***/
    int deleteSchedulesByIds(List<Long> ids);
/***
 * 分页查询
 * ***/

    Page<Schedule> pageQuery(SchedulePageDto schedulePageDto);
}
